class PSGFXIntel extends GFxMoviePlayer;

var GFxObject mc, txt, txtTitulo;

var string texto, titulo;
var bool bSmallItel;

function bool Start(optional bool StartPaused = false)
{
    super.Start();
    Advance(0);

	mc = GetVariableObject("_root");

	return true;
}

function SetIntelText(string _titulo,string _texto,bool _bSmallItel)
{
	texto = _texto;
	titulo = _titulo;
	bSmallItel = _bSmallItel;

	if(bSmallItel) mc.GotoAndPlay("intelFadeInSmall");
	else mc.GotoAndPlay("intelFadeIn"); 


	if(txt!=none)  txt.SetText(texto);
	if(txtTitulo!=none)  txtTitulo.SetText(titulo);
}

function CloseIntel()
{
	texto="";
	titulo="";

	if(bSmallItel) mc.GotoAndPlay("intelFadeOutSmall");
	else mc.GotoAndPlay("intelFadeOut"); 
}

event bool WidgetInitialized(name WidgetName, name WidgetPath, GFxObject Widget)
{ 
	switch(WidgetName)
	{
		case ('txtDatos'):
			txt = Widget;
			txt.SetText(texto);
			break;

		case ('txtTitulo'):
			txtTitulo = Widget;
			txtTitulo.SetText(titulo);
			break;
	}

	return true;
}


DefaultProperties
{
	bEnableGammaCorrection=FALSE
	bPauseGameWhileActive=false
	bCaptureInput=false
	MovieInfo = SwfMovie'PS_Intel.intel'
}
